﻿<!-- 
 Family Lines code is provided using the Apache License V2.0, January 2004 http://www.apache.org/licenses/
 -->
<UserControl x:Class="KBS.FamilyLines.Controls.FactDetails"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
             xmlns:local="clr-namespace:KBS.FamilyLines" 
             xmlns:Properties="clr-namespace:KBS.FamilyLines.Properties"
             mc:Ignorable="d" 
             d:DesignHeight="300" 
             d:DesignWidth="300">

    <UserControl.Resources>
        <ResourceDictionary>
            <local:NotConverter x:Key="NotConverter"/>
        </ResourceDictionary>
    </UserControl.Resources>

    <StackPanel Margin="0,0,0,5" HorizontalAlignment="Stretch">

        <DockPanel>
            <Label Content="{Binding Path=FactName}" DockPanel.Dock="Left" 
                   Target="{Binding ElementName=FactTextBox, Mode=OneWay}" 
                   Foreground="{DynamicResource InputFontColor}" />
        
            <Image Margin="4,0,0,0" Cursor="Hand" x:Name="EditAllDetails" DockPanel.Dock="Right"
                   MouseLeftButtonUp="Click_EditAllDetails" HorizontalAlignment="Right" 
                   VerticalAlignment="Center" Source="..\Images\RightArrowBlue.png" 
                   Width="16" Height="16" ToolTip="{x:Static Properties:Resources.FactEditTooltip}" />
        </DockPanel>
        
        <TextBox TextWrapping="NoWrap" 
                 x:Name="FactTextBox" 
                 AcceptsReturn="True"
                 HorizontalAlignment="Left"
                 Margin="5,0,0,0"
                 Text="{Binding Path=Fact, Mode=TwoWay}" 
                 Width="230" 
                 IsEnabled="{Binding Path=IsLocked, Converter={StaticResource NotConverter}, Mode=Default}" 
                 Height="21.96" 
                 ToolTip="" 
                 ToolTipOpening="ToolTip_All"/>


    </StackPanel>
</UserControl>
